
<div class="layui-btn-container">
	<#if (mapButton.button)!''>
		<#list mapButton.button as btn>
				<!--启动流程-->
			<#if btn.operatortype==1>
					<button type="button" class="layui-btn layui-btn-sm" lay-submit lay-filter="run"><i class="layui-icon layui-icon-triangle-r"></i>${btn.btnname}</button>
			</#if>
				<!--流程设计图-->
			<#if btn.operatortype==2>
					<button type="button" class="layui-btn flowDesign layui-btn-sm"><i class="layui-icon layui-icon-picture-fine"></i>${btn.btnname}</button>
			</#if>
				<!--打印-->
				<!--2019-12-19 jyq将打印按钮屏蔽-->
			<!--<#if btn.operatortype==3>
					<button type="button" class="layui-btn print layui-btn-sm">${btn.btnname}</button>
			</#if>-->
				<!--保存数据-->
			<#if btn.operatortype==6>
				<#if isDraft>
						<button type="button" class="layui-btn save layui-btn-sm" lay-submit lay-filter="saveData"><i class="iconfont icongongdanqueren"></i> 保存数据</button>
				<#else>
						<button type="button" class="layui-btn save layui-btn-sm" lay-submit lay-filter="saveDraft"><i class="iconfont iconicon_baocun"></i> 保存草稿</button>
				</#if>
					<!--2020-01-15 jyq屏蔽，经讨论重置功能没有必要，先注释掉-->
					<!--<button type="button" class="layui-btn reset layui-btn-sm"><i class="layui-icon layui-icon-refresh"></i>重置</button>-->
			</#if>
		</#list>
	<#else>
		<button type="button" class="layui-btn layui-btn-sm" lay-submit lay-filter="run"><i class="layui-icon layui-icon-ok"></i>启动流程</button>
		<#if isDraft>
			<button type="button" class="layui-btn layui-btn-sm" lay-submit lay-filter="saveData"><i class="iconfont icongongdanqueren"></i> 保存数据</button>
		<#else>
			<button type="button" class="layui-btn layui-btn-sm" lay-submit lay-filter="saveDraft"><i class="iconfont iconicon_baocun"></i> 保存草稿</button>
		</#if>
        <!--<button type="button" class="layui-btn reset layui-btn-sm"><i class="layui-icon layui-icon-refresh"></i>重置</button>-->
		<button type="button" class="layui-btn flowDesign layui-btn-sm"><i class="layui-icon layui-icon-picture-fine"></i>流程图</button>
	</#if>
    <button type="button" class="layui-btn assignUser layui-btn-sm"><i class="layui-icon layui-icon-friends"></i>指定执行人</button>

	<!--流程帮助-->
	<#if sysFile??  && (sysFile?size >0)>
		<#if sysFile!="0">
			<!--个人附件-->
			<div class="layui-layout-right" style="position: absolute; right: 30px; top: 30px;">
                <span style="font-size: 14px;line-height: 30px;float: left;margin-right: 5px;">流程帮助</span>
				<i class="iconfont iconicon_yiwenkongxin" id="helpFile" onclick="helpFile('${sysFile.fileId}','${sysFile.fileName}')" style="font-size: 20px;display: inline-block;line-height: 30px;"></i>
			</div>
		</#if>
	</#if>
</div>


<script type="text/javascript">

    //流程帮助，下载附件
    function helpFile(_fileId,_fileName) {
        layer.confirm('确定下载【'+(_fileName!=undefined?_fileName:null)+'】吗？', {
            btn: ['是', '否'] //按钮
        }, function (index) {
            if(_fileId==undefined||_fileId==''){
                layer.msg("附件不存在，请重新选择！",{icon:5,time:1000});
            }else {
                window.open(serverPath.systemPath + setter.sysLinkPath + "attachFile/download?fileId=" + _fileId);
            }
            layer.close(index);
        });
    }

	//前置脚本
    function beforeClick(operatorType){
        <#if (mapButton.button)!''>
        	switch(operatorType){
				<#list mapButton.button as btn>
					<#if btn.prevscript!''>
						case ${btn.operatortype}:
							${btn.prevscript}
							break;
					</#if>
				</#list>
        	}
        </#if>
    }

    //后置脚本
    function afterClick(operatorType){
        <#if (mapButton.button)!''>
        	switch(operatorType){
				<#list mapButton.button as btn>
					<#if btn.afterscript!''>
						case ${btn.operatortype}:
							${btn.afterscript}
                            break;
					</#if>
				</#list>
            }
		</#if>
    }

</script>